import instance from '../utils/request'
// 导入instance函数

// 抽取api 用户信息
const getArticle = ({ id }) => {
  return instance({
    url: '/v1_0/articles/' + id,
    method: 'get'
  })
}
// 抽取api 关注用户
const followUser = ({ target }) => {
  return instance({
    url: '/v1_0/user/followings',
    method: 'post',
    data: {
      target
    }
  })
}
// 抽取api 取关用户
const unFollowUser = ({ target }) => {
  return instance({
    url: '/v1_0/user/followings/' + target,
    method: 'delete'
  })
}
// 暴露出去
export { getArticle, followUser, unFollowUser }
